home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 3 / BBS in a box - Trilogy III.iso / Files / Prog / H-K / Help Package ƒ / Help Globals.p next >
Encoding:
Text File  |  1992-06-10  |  3.0 KB  |  64 lines  |  [TEXT/PJMM]

  1. unit HelpGlobals;
  2.  
  3. interface
  4.  
  5.     const
  6.         noErr = 0;
  7.         HmiLNotAvail = 1;    {*The main 'HmiL' resource was not read into memory.  Probably a wrong ID number.*}
  8.         HierHmiLNotAvail = 2;    {*An 'HmiL' resource for an hierarchical menu was not found.*}
  9.         HTextNotAvail = 3;        {*A specified 'TEXT' resource was not found.*}
  10.         HelpHandleErr = 4;        {*There was an error in getting a handle to the Help Menu.*}
  11.         NilHandle = 5;                {*There was a problem allocating a handle.  Probably due to lack of memory.*}
  12.         DataErr = 6;                {*There was an error in finding the selected menu.*}
  13.                                 {*The menu setup didn't work or the data was trashed*}
  14.         NoMenu = 7;                {*If the menu ID passed to DoHelp is not associated with the Help*}
  15.                                 {*menu, return with this code*}
  16.  
  17.         _Gestalt = $A1AD;        {*This is the trap number of the Gestalt Function.*}
  18.  
  19. {**************************************************************}
  20. {*    Change these globals for different effects on the appearance and placement of the Help Menu*}
  21. {**************************************************************}
  22.         FONTFACE = 3;        {*This is the typeface of the display*}
  23.         FONTSIZE = 12;            {*This is the font size of the display*}
  24.  
  25.         HELPMENUTITLE = 'Help';    {*This is the title of the menu built when the System 7 Help*}
  26.                                     {*menu is not accessible.*}
  27.  
  28.         NonSevenMenuID = 32767;        {*This is the menu ID used when the System 7 Help menu*}
  29.                                         {*is not accessible.  Make sure it does not conflict with*}
  30.                                         {*a menu ID from your application.*}
  31.  
  32.         MaxMenu = 1;            {*This is the maximum number of hierarchical menus you want to have in the Help menu.*}
  33. {**************************************************************}
  34.  
  35.     type
  36.         MPtr = ^MitemList;        {*A pointer to the Menu Item List.*}
  37.         MHandle = ^MPtr;        {*A handle to the Menu Item List.*}
  38.         MItemList = record
  39.                 ItemTitle: Str255;    {*The title of this menu item…Used only for data integrity check.*}
  40.                 HelpTextID: Integer;    {*The ID of the 'TEXT' resource containing the help text for this item.*}
  41.                 NextItem: MHandle;    {*A handle to the next item in the list.*}
  42.             end;
  43.  
  44.         MenuRecs = record
  45.                 ID: Integer;            {*The ID# of this menu.*}
  46.                 Master: MHandle;    {*A handle to the first Item List Record in the linked list.*}
  47.             end;
  48.  
  49.         MenuSetup = array[0..MaxMenu] of MenuRecs;
  50.             {*An array of the different menus within and including the Help Menu.*}
  51.  
  52.     var
  53.         HelpMenuHandle: MenuHandle;        {*Holds the handle to the Help Menu.*}
  54.         HelpMenuID: integer;                    {*Holds the menu ID of the Help menu in case not System 7.*}
  55.         TheMenu: MenuSetup;                {*Holds the menu ID's and items of the Help Menu.*}
  56.         HelpMenuItems: integer;                {*Holds the number of menu items initially in the Help Menu*}
  57.                                             {*under System 7.*}
  58.         USEHMENUS: Boolean;        {*Set this to true if you are going to use hierarchical menus.*}
  59.             {*By setting this to true,  your help items will be put in a new menu*}
  60.             {*at the end of the current menu bar.  They will NOT appear in the Help menu designated*}
  61.             {*under System 7.  Set this before calling InitHelp*}
  62.  
  63. implementation
  64. end.